<html>
<head>
<link rel="stylesheet" href="/static/diary.css" type="text/css">
</head>

<body>
<h1>Department List</h1>

{% if errors %}
<ul>
{% for error in errors %}
<li>{{error}}</li>
{% endfor %}
</ul>
{% endif %}
<form action="/department/" method="post">
{% csrf_token %}
<table border='0' cellspacing='0' cellpadding='0'>
<tr><th>&nbsp;</th><th>部门名称</th><th>地址</th></tr>
{% for dp in dp_list %}
<tr><td><input type="checkbox" name="dp_del" value={{dp.name}}></input></td><td>{{dp.name}}</td><td>{{dp.address}}</td></tr>
{% endfor %}
</table>
<input type="submit" name="op" value="del"></input>
<br/><br/>
<table border="0" cellspacing="0" cellpading="0">
    <tr><td>部门名称</td><td><input type="text" name="dp_name"/></td></tr>
    <tr><td>地址</td><td><input tyoe="text" name="dp_addr"/></td></tr>
</table>
<input type="submit" name="op" value="add"></input>
</form>

</body>
</html>
